package com.education.wisdom.service.impl;

import com.education.common.utils.Convert;
import com.education.wisdom.mapper.LeaveMessageMapper;
import com.education.wisdom.pojo.LeaveMessage;
import com.education.wisdom.service.LeaveMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * 直播留言表 服务层实现
 *
 * @author d
 * @date 2020-08-06 17:47:30
 */
@Service
public class LeaveMessageServiceImpl implements LeaveMessageService {

    @Autowired
    private LeaveMessageMapper leaveMessageMapper;

    //查询直播留言表信息
    @Override
    public LeaveMessage selectLeaveMessageById(Integer id) {
        return leaveMessageMapper.selectLeaveMessageById(id);
    }

    // 查询直播留言表列表
    @Override
    public List<LeaveMessage> selectLeaveMessageList(LeaveMessage leaveMessage) {
        return leaveMessageMapper.selectLeaveMessageList(leaveMessage);
    }

    // 新增直播留言表
    @Override
    public int insertLeaveMessage(LeaveMessage leaveMessage) {
        return leaveMessageMapper.insertLeaveMessage(leaveMessage);
    }

    //修改直播留言表
    @Override
    public int updateLeaveMessage(LeaveMessage leaveMessage) {
        return leaveMessageMapper.updateLeaveMessage(leaveMessage);
    }

    //删除直播留言表对象
    @Override
    public int deleteLeaveMessageByIds(String ids) {
        return leaveMessageMapper.deleteLeaveMessageByIds(Convert.toStrArray(ids));
    }
}